Improve SmartPdfCopy compression and performance#132
Conversation
- Don't attempt stream/dictionary content matching if reference already processed - Match seen references by RefKey and not by PdfObject - RefKey should compare Num before Gen for early exits
PR Summary
|
While correcting a bug that caused an infinite loop in SmartPdfCopy when handling certain documents (#124), we have lost the ability to remove duplicate dictionaries.
This causes the document to become unnecessarily large when appending multiple documents that are based on the same template (eg: thousands of documents prepared for a print job)
These changes restore that capability, and prevent re-visiting the same nodes when detecting identical content, or already processed nodes, improving performance handling many streams/dictionaries (especially recursive)